﻿@model Teamwish.Domain.Models.Userinfo

@{
    ViewBag.Title = "Edit";
}

<div class="x-body">
    <form class="layui-form" method="post">
        @Html.AntiForgeryToken()
        @Html.HiddenFor(Model => Model.Id)
        <div class="layui-form-item">
            <label for="Username" class="layui-form-label">
                <span class="x-red"></span>Username
            </label>
            <div class="layui-input-inline">
                @Html.TextBoxFor(model => model.Username, new { @class = "layui-input disabled" })
            </div>
            <div class="layui-form-mid layui-word-aux">
                <span class="x-red"></span>@Html.ValidationMessageFor(model => model.Username, null, new { @class = "x-red" })
            </div>
        </div>
        <div class="layui-form-item">
            <label for="Password" class="layui-form-label">
                <span class="x-red"></span>Password
            </label>
            <div class="layui-input-inline">
                @Html.TextBox("Password","", new { @class = "layui-input" })
            </div>
            <div class="layui-form-mid layui-word-aux">
                <span class="x-red"></span>@Html.ValidationMessageFor(model => model.Password, null, new { @class = "x-red" })
            </div>
        </div>
        <div class="layui-form-item">
            <label for="Email" class="layui-form-label">
                <span class="x-red"></span>Email
            </label>
            <div class="layui-input-inline">
                @Html.TextBoxFor(model => model.Email, new { @class = "layui-input" })
            </div>
            <div class="layui-form-mid layui-word-aux">
                <span class="x-red"></span>@Html.ValidationMessageFor(model => model.Email, null, new { @class = "x-red" })
            </div>
        </div>
        <div class="layui-form-item">
            <label for="Telephone" class="layui-form-label">
                <span class="x-red"></span>Telephone
            </label>
            <div class="layui-input-inline">
                @Html.TextBoxFor(model => model.Telephone, new { @class = "layui-input" })
            </div>
            <div class="layui-form-mid layui-word-aux">
                <span class="x-red"></span>@Html.ValidationMessageFor(model => model.Telephone, null, new { @class = "x-red" })
            </div>
        </div>
        <div class="layui-form-item">
            <label for="Address" class="layui-form-label">
                <span class="x-red"></span>Address
            </label>
            <div class="layui-input-inline">
                @Html.TextBoxFor(model => model.Address, new { @class = "layui-input" })
            </div>
            <div class="layui-form-mid layui-word-aux">
                <span class="x-red"></span>@Html.ValidationMessageFor(model => model.Address, null, new { @class = "x-red" })
            </div>
        </div>
        <div class="layui-form-item">
            <label for="Postcode" class="layui-form-label">
                <span class="x-red"></span>Postcode
            </label>
            <div class="layui-input-inline">
                @Html.TextBoxFor(model => model.Postcode, new { @class = "layui-input" })
            </div>
            <div class="layui-form-mid layui-word-aux">
                <span class="x-red"></span>@Html.ValidationMessageFor(model => model.Postcode, null, new { @class = "x-red" })
            </div>
        </div>
       
        <div class="layui-form-item">
            <label for="State" class="layui-form-label">
                <span class="x-red"></span>State
            </label>
            <div class="layui-input-inline">
                @Html.TextBoxFor(model => model.State, new { @class = "layui-input" })
            </div>
            <div class="layui-form-mid layui-word-aux">
                <span class="x-red"></span>@Html.ValidationMessageFor(model => model.State, null, new { @class = "x-red" })
            </div>
        </div>
        <div class="layui-form-item">
            <label for="Remark" class="layui-form-label">
                <span class="x-red"></span>Remark
            </label>
            <div class="layui-input-inline">
                @Html.TextBoxFor(model => model.Remark, new { @class = "layui-input" })
            </div>
            <div class="layui-form-mid layui-word-aux">
                <span class="x-red"></span>@Html.ValidationMessageFor(model => model.Remark, null, new { @class = "x-red" })
            </div>
        </div>
        <div class="layui-form-item">
            <label for="Remark" class="layui-form-label">
                <span class="x-red"></span>角色
            </label>
            <div class="layui-input-inline">
                @Html.EnumDropDownListFor(model => model.Role, htmlAttributes: new { @class = "form-control" })
            </div>
            <div class="layui-form-mid layui-word-aux">
                <span class="x-red"></span>@Html.ValidationMessageFor(model => model.Role, null, new { @class = "x-red" })
            </div>
        </div>

        <div class="layui-form-item">
            <label for="L_repass" class="layui-form-label">
            </label>
            <button class="layui-btn" lay-filter="add" lay-submit="">
                保存
            </button>
        </div>
    </form>
</div>

@section scripts{
    <script>
        layui.use(['form','layer'], function(){
            $ = layui.jquery;
          var form = layui.form
          ,layer = layui.layer;

          //自定义验证规则
          form.verify({
              LastName: function (value) {
              if(value.length < 1){
                return '昵称至少得1个字符啊';
              }
            }
          });
         @if (TempData["Msg"]!=null) {
             @:layer.alert("@TempData["Msg"]");
         }

		});
    </script>
}


